<!DOCTYPE html>
<html>
<head lang="en">
    <title>页面B</title>
</head>
<body>

<button onclick="change()">change</button>

<script>
    function change() {
        localStorage.setItem('name', 'kingx2');
    }
</script>


</body>
</html>